import request from '@/utils/request'
// 获取企业部门列表
export const reqGetDepartments = () => request({ url: '/company/department' })

// 删除部门
export const reqDelDEpartment = id => request({ method: 'delete', url: `/company/department/${id}` })

// 新增部门
export const reqAddDEpartment = data =>
  request({
    method: 'post',
    url: '/company/department',
    data
  })
// 根据id查询部门详情
export const reqGetDepartDetail = id => request({ url: `/company/department/${id}` })
// 更新部门信息
export const reqUpdateDepartments = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  // get/ delete 携带参数 params   ----- post put patch 携带参数用data
  data
})

